<script setup>
import {useRouter} from 'vue-router'

const router = useRouter()
console.log(router)
</script>

<template>
  <div class="header">
    {{ router.currentRoute.value.meta.title }}
  </div>
</template>

<style scoped>
.header {
  background-color: white;
  height: 30px;
  /* 设置元素显示方式为弹性布局 */
  display: flex;
  /* 设置下边框为1px实线，颜色为#e0e0e0 */
  border-bottom: 1px solid #e0e0e0;
  /* 设置垂直对齐方式为居中 */
  align-items: center;
  /* 设置水平对齐方式为居中 */
  justify-content: center;
}
</style>